<?php
class Admin_Block_Topic extends Epic_View_Block {
	public function getAllTopic () {
			
		return Epic::getModel('admin/topic')
			->getCollection()
			->load();
	}
	public function getTopic ($id_topic){
		return Epic::getModel('admin/topic')
			->load($id_topic);
	}
	public function getAllPagerOfTopic ($id_topic) {
		if (Epic::getSession()->get('admin')==false)
			header("Location: ".Epic::getUrl('admin/acc/login'));
		return Epic::getModel('admin/Pager')->getCollection()
			->where('id_topic', array('eq' => $id_topic))
			->load();					
	}
}